package com.nbsaas.boot.cms.rest.convert;

import com.nbsaas.boot.cms.data.entity.ArticleComment;
import com.nbsaas.boot.cms.api.domain.request.ArticleCommentRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 文章评论请求对象转换成实体对象
*/

public class ArticleCommentEntityConvert  implements Converter<ArticleComment, ArticleCommentRequest> {

    @Override
    public ArticleComment convert(ArticleCommentRequest source) {
        ArticleComment result = new ArticleComment();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

